1. Field of the Invention
The present invention relates to a nonvolatile semiconductor memory device having a security function and more particularly to a nonvolatile semiconductor memory device comprising at least one memory block comprising a plurality of nonvolatile memory cells, and having a password protection function by which data cannot be read out from a part of the memory block or the entire memory block without a cancel operation using a password.
2. Description of the Related Art
As the number of kinds of electronic devices using a nonvolatile semiconductor memory device is increased, usage of the nonvolatile semiconductor memory device such as a flash memory in which stored information is not erased even when a power supply used in the electronic device is turned off has been diversified.
For example, according to a mobile phone, as capacity of the nonvolatile semiconductor memory device becomes large, usage in which a system program is stored in a part of a memory region and data which can be read or written by a user such as application data or a telephone directory is stored in the other memory region has been increasingly employed. In addition, usage in which nonvolatile semiconductor memory devices comprising a plurality of chips in one package are laminated to be mounted is also increasingly employed.
Furthermore, according to a digital television or a liquid crystal television, an electronic programming guide is automatically and regularly inputted and updated program data is stored in an internal nonvolatile semiconductor memory device.
Furthermore, according to a communication device, a fax machine, a copying machine and the like are increasingly integrated, so that usage in which once copied data is stored in the nonvolatile semiconductor memory device so as not be erased by a trouble in communication or an unexpected power-off is also increasingly employed. Furthermore, a charged delivery service to provide video contents in satellite broadcast or a cable television and the like are prevailed, the nonvolatile semiconductor memory device is provided in a set-top box so as to be used in a system in which payment information or personal information is stored and only subscribers can receive the service.
Thus, according to the nonvolatile semiconductor memory device which is highly diversified in usage, there is developed a nonvolatile semiconductor memory device comprising a security function against a case where data is leaked by reading out the written data from outside and using it illegally or the service is illegally used.
The security function is to prevent data stored in the nonvolatile semiconductor memory device from being read illegally by a malicious user or third person. For example, a vendor of the memory device or a manufacturer of application of the memory device separately sets a region in which a verifying password is stored in a memory region of a nonvolatile semiconductor memory device, and the verifying password is set prior to writing of internal data before or after shipment. Thus, a password is inputted from outside before the internal data is read and when the password does not coincide with the verifying data stored in the memory device, the stored data cannot be outputted or erroneous data is outputted. Such security function is disclosed in Japanese Unexamined Patent Publication No. 2001-5729 (patent document 1) and Japanese Unexamined Patent Publication No. 9-69067 (patent document 2), for example.
According to a security function disclosed in the patent document 1, a function to prevent a password itself from being illegally read out is added to a fundamental function to protect data from being read out using the password. More specifically, according to the security function disclosed in the patent document 1, a password region in which a password is stored is previously provided in a memory region and the password region can be accessed only when it is accessed by a specific address except for a previously provided trap address instead of the password. However, this trap address places a burden on the system side additionally. For example, since the trap address is provided, when a normal serial address space is sequentially read out, it is necessary to avoid the trap address, which increases the burden on the system side. Furthermore, according to a constitution in which data is erased in order to protect the data such as the password stored in the password region, when the password region is not appropriately accessed, the data could be lost improperly, and address management on the system side becomes complicated.
According to a security function disclosed in the patent document 2, although a fundamental function to protect data using a password from being illegally read out, and setting and verifying operations for the password are disclosed, it is not disclosed in detail that which part of a memory region is how protected. According to usage of a nonvolatile semiconductor memory device in an electronic device, there is a case where a boot-block region accessed by the CPU first is to be excluded from the password protection even in a memory region in the same chip. However, according to the security function disclosed in the patent document 2, a system is not designed to correspond to such selective operation. In addition, after the protection state with the password is cancelled once, when a forced reset by turning off a power supply or a hardware reset by a command input is generated, it is not clear how effectiveness of the password is maintained afterwards. For example, when the password is canceled once, it is necessary to clarify whether the password cancel state is maintained after the reset, or the password cancel state is also reset to the password protection state after the reset.